package com.example.login.filter;

import javax.servlet.*;
import javax.servlet.annotation.WebFilter;
import java.io.IOException;

@WebFilter("/*")
public class EmpFilter implements Filter {
    @Override
    public void doFilter(ServletRequest srt, ServletResponse sre, FilterChain fc)
            throws IOException, ServletException {
        srt.setCharacterEncoding("utf-8");
        sre.setCharacterEncoding("utf-8");
        fc.doFilter(srt,sre);
    }

    @Override
    public void init(FilterConfig filterConfig) throws ServletException {

    }

    @Override
    public void destroy() {

    }
}
